package com.baolai.tool;

import cn.hutool.core.util.RandomUtil;

/**
 * 生成id
 * @author :pluto
 */

public class RandomIdTool {

    /**
     * 生成随机id,当前时间+3位随机数
     * @return id
     */
    public static Long createRandomId(){
        long dateNow = System.currentTimeMillis();
        long randomNum = RandomUtil.randomLong(0,999);
        return dateNow * 1000 + randomNum;
    }


}
